package com.basic.model.quartz;

import com.basic.model.quartz.param.TaskParam;
import lombok.extern.slf4j.Slf4j;
import org.quartz.Job;
import org.quartz.JobExecutionContext;
import org.quartz.JobExecutionException;
import org.springframework.stereotype.Component;

@Slf4j
@Component
public class BasicSchedulerJob implements Job {



    @Override
    public void execute(JobExecutionContext jobContext) throws JobExecutionException {
        final TaskParam decode = TaskParam.decode(jobContext.getJobDetail().getJobDataMap().getString(BasicJobManager.JOB_DATA));

        log.info("decode:" + decode);
        log.info("decode.body" + decode.getBodyFormat());
    }

}
